Theory of humor